#!/usr/bin/python3
# coding=utf-8
#
# Copyright (C) 2023-2024. Huawei Technologies Co., Ltd. All rights reserved.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# ===============================================================================

import numpy as np
import torch

def gen_golden_data():
    dtype = np.float32
    input_x = np.random.uniform(-10, 10, [8, 2048]).astype(dtype)

    selu = torch.nn.SELU()
    golden = selu(torch.tensor(input_x)).numpy().astype(dtype)

    input_x.tofile("./input/input_x.bin")
    golden.tofile("./output/golden.bin")


if __name__ == "__main__":
    gen_golden_data()
